package com.cqc.manage.service.Imp.business;

import cn.hutool.core.date.DateUtil;
import com.cqc.manage.dto.BusinessDto;
import com.cqc.manage.entity.MessageBusiness;
import com.cqc.manage.repositories.MessageBusinessRepositories;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MessageBusinessService {

    private Logger LOG = LoggerFactory.getLogger(MessageBusinessService.class);


    @Autowired
    private MessageBusinessRepositories messageBusinessRepositories ;


    /**
     * 更新数据
     * @param businessDto
     * @return
     */
    public MessageBusiness addRemarkBusiness(BusinessDto businessDto){
        MessageBusiness byContractNo = messageBusinessRepositories.findByContractNo(businessDto.getContractNo());
        byContractNo.setRemarks(businessDto.getRemarks());
        MessageBusiness update_Business = messageBusinessRepositories.save(byContractNo);
        return update_Business;
    }



}
